package tom.spring.cloud.feign;

import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * 本项目依赖kafka,kafka依赖zookeeper
 * @author ZHUFEIFEI
 */
@EnableCircuitBreaker
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class Consumer02Application {
    public static void main(String[] args) {
        SpringApplication.run(Consumer02Application.class, args);
    }

    /**
     * 自定义feign的日志级别，默认是NONE
     * 也可以在FeignClient中提供Configuration类针对性打印日志
     * @return
     */
    @Bean
    public Logger.Level feignLogLevel() {
        return Logger.Level.FULL;
    }
}
